import 'package:flutter/material.dart';

class Utils {
  static showTextSnack(BuildContext context, String content) {
    ScaffoldMessenger.of(context).removeCurrentSnackBar();
    ScaffoldMessenger.of(context).showSnackBar(
        SnackBar(content: Text(content), duration: Duration(seconds: 2)));
  }

  static String? processSpecial(String? text) {
    return text
        ?.replaceAll("&ldquo;", "“")
        .replaceAll("&rdquo;", "”")
        .replaceAll("&mdash;", "—")
        .replaceAll("<em class='highlight'>", "「")
        .replaceAll("</em>", "」");
  }
}
